package old.ooday03;
import java.util.Random;



public class SeaWar {
    int width;
    int height;
    int x;
    int y;
    int speed;
    void move(){
        System.out.println("战舰移动啦");
    }
    SeaWar(int width,int height){
        this.width=width;
        this.height=height;
        x=-width;
        Random rand=new Random();
        y=rand.nextInt(479-height-150+1)+150;
        speed=rand.nextInt(7)+1;

    }
    SeaWar(int width,int height,int x,int y,int speed){
        this.width=width;
        this.height=height;
        this.x=x;
        this.y=y;
        this.speed=speed;

    }
}
